﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace ZX.SYS.Library.AdiDl.PageBusiness
{
    public class PageBase:IPageBlock
    {
        public PageBase() { }

        private string _ModifyID;
        public string ModifyID
        {
            get { return _ModifyID; }
            set { this._ModifyID = value; }
        }

        private string _ViewID;
        public string ViewID
        {
            get { return _ViewID; }
            set { this._ViewID = value; }
        }

        private object _BasePage;
        public object BasePage {
            get { return _BasePage; }
            set { this._BasePage = value; }
        }

        private string _PageState;
        public string PageState {
            get { return _PageState; }
            set { this._PageState = value; }
        }

        private bool _IsDisplay;
        public bool IsDisplay
        {
            get { return this._IsDisplay; }
            set { this._IsDisplay = value; }
        }

        protected virtual void Init()
        {
            if (string.IsNullOrEmpty(this.ModifyID))
            {
                this.ModifyID = "Modify";
            }
            if (string.IsNullOrEmpty(this.ViewID))
            {
                this.ViewID = "View";
            }

            if (this._BasePage == null)
                throw new Exception("The Server Page Control is null!");
        }

        protected virtual void Main()
        {
            Init();
        }

        public void ShowContainer()
        {
            this.Main();
        }

    }
}
